export const handleGetRgbaObject = (rgbaStr) => {
  //颜色处理
  const color = rgbaStr
    .replace("rgba", "")
    .replace("rgb", "")
    .replace("(", "")
    .replace(")", "")
    .split(",");
  return Object.assign(
    {},
    {
      r: color[0] || 0,
      g: color[1] || 0,
      b: color[2] || 0,
      a: color[3] || 1,
    }
  );
};
export const handleGetToRgba = (rgba) => {
  return `rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`;
};
